using UnityEngine;

public class TutorialStepGetFreeWeapon : TutorialBase
{
	public int timeWeapon = 900;

	public override void OnStart()
	{
		base.OnStart();
		WalkWindow.instance.slotSelector.enabled = false;
		WalkWindow.instance.slotSelector.RemoveAllEventsListeners();
		Object.Destroy(WalkWindow.instance.slotSelector);
		EventDelegate.Add(TutorialManager.instance.buttonFreeWeapon.onClick, OnComplete);
		TutorialManager.instance.windowFreeWeapon.SetActive(true);
		GameController.instance.playerScript.currentCar.CancelResetCarWithDelayOnline();
	}

	public override void OnComplete()
	{
		TutorialManager.instance.windowFreeWeapon.SetActive(false);
		TemporalProductManager.AddProduct("Tutorial_Famas", timeWeapon, TutorialManager.weaponKey);
		TemporalProductManager.AddProduct("Tutorial_Armor", timeWeapon, TutorialManager.armorKey);
		MarketController.Instance.Equip("Weapons", TutorialManager.weaponKey);
		MarketController.Instance.Equip("Armor", TutorialManager.armorKey);
		base.OnComplete();
	}
}
